@echo off

set target=''
setlocal enabledelayedexpansion
for /f  "delims=\r\n" %%i in (input.txt)  do (
set target=%%i
echo !target! > line.txt
test < line.txt >> output.txt
demo<line.txt>>correct.txt
) 

fc correct.txt output.txt
pause

